home *** CD-ROM | disk | FTP | other *** search
- global gMasterData, gExtendData, buttonSp, coinSp, coinCoverSp, responseSp, greyScreenSp
-
- on pushButton mouseClickV, mouseClickH
- if coinSp < 59 then
- set clickButt to EMPTY
- case 1 of
- inside(point(mouseClickH, mouseClickV), rect(90, 250, 552, 286)):
- case 1 of
- inside(point(mouseClickH, mouseClickV), rect(90, 250, 130, 286)):
- set clickButt to "1"
- inside(point(mouseClickH, mouseClickV), rect(138, 250, 178, 286)):
- set clickButt to "2"
- inside(point(mouseClickH, mouseClickV), rect(185, 250, 225, 286)):
- set clickButt to "3"
- inside(point(mouseClickH, mouseClickV), rect(232, 250, 272, 286)):
- set clickButt to "4"
- inside(point(mouseClickH, mouseClickV), rect(279, 250, 319, 286)):
- set clickButt to "5"
- inside(point(mouseClickH, mouseClickV), rect(326, 250, 366, 286)):
- set clickButt to "6"
- inside(point(mouseClickH, mouseClickV), rect(373, 250, 413, 286)):
- set clickButt to "7"
- inside(point(mouseClickH, mouseClickV), rect(420, 250, 460, 286)):
- set clickButt to "8"
- inside(point(mouseClickH, mouseClickV), rect(465, 250, 507, 286)):
- set clickButt to "9"
- inside(point(mouseClickH, mouseClickV), rect(512, 250, 552, 286)):
- set clickButt to "10"
- end case
- inside(point(mouseClickH, mouseClickV), rect(90, 293, 552, 329)):
- case 1 of
- inside(point(mouseClickH, mouseClickV), rect(90, 293, 130, 329)):
- set clickButt to "11"
- inside(point(mouseClickH, mouseClickV), rect(138, 293, 178, 329)):
- set clickButt to "12"
- inside(point(mouseClickH, mouseClickV), rect(185, 293, 225, 329)):
- set clickButt to "13"
- inside(point(mouseClickH, mouseClickV), rect(232, 293, 272, 329)):
- set clickButt to "14"
- inside(point(mouseClickH, mouseClickV), rect(279, 293, 319, 329)):
- set clickButt to "15"
- inside(point(mouseClickH, mouseClickV), rect(326, 293, 366, 329)):
- set clickButt to "16"
- inside(point(mouseClickH, mouseClickV), rect(373, 293, 413, 329)):
- set clickButt to "17"
- inside(point(mouseClickH, mouseClickV), rect(420, 293, 460, 329)):
- set clickButt to "18"
- inside(point(mouseClickH, mouseClickV), rect(465, 293, 507, 329)):
- set clickButt to "19"
- inside(point(mouseClickH, mouseClickV), rect(512, 293, 552, 329)):
- set clickButt to "20"
- end case
- inside(point(mouseClickH, mouseClickV), rect(90, 336, 552, 372)):
- case 1 of
- inside(point(mouseClickH, mouseClickV), rect(90, 336, 130, 372)):
- set clickButt to "21"
- inside(point(mouseClickH, mouseClickV), rect(138, 336, 178, 372)):
- set clickButt to "22"
- inside(point(mouseClickH, mouseClickV), rect(185, 336, 225, 372)):
- set clickButt to "23"
- inside(point(mouseClickH, mouseClickV), rect(232, 336, 272, 372)):
- set clickButt to "24"
- inside(point(mouseClickH, mouseClickV), rect(279, 336, 319, 372)):
- set clickButt to "25"
- inside(point(mouseClickH, mouseClickV), rect(326, 336, 366, 372)):
- set clickButt to "26"
- inside(point(mouseClickH, mouseClickV), rect(373, 336, 413, 372)):
- set clickButt to "27"
- inside(point(mouseClickH, mouseClickV), rect(420, 336, 460, 372)):
- set clickButt to "28"
- inside(point(mouseClickH, mouseClickV), rect(465, 336, 507, 372)):
- set clickButt to "29"
- inside(point(mouseClickH, mouseClickV), rect(512, 336, 552, 372)):
- set clickButt to "30"
- end case
- end case
- if clickButt <> EMPTY then
- pushButton2(clickButt)
- end if
- end if
- end
-
- on pushButton2 clickButt
- puppetSound("button tone")
- updateStage()
- case the skillLevel of gExtendData of
- #more, #most:
- set coinValue to value(clickButt)
- set xx to coinValue + 119
- set clickButt to string(xx)
- end case
- setButton(gExtendData, clickButt)
- puppetSprite(buttonSp, 1)
- set gbuttonDn to clickButt && "dn"
- set the memberNum of sprite buttonSp to the number of member gbuttonDn
- set the loc of sprite buttonSp to point(320, 240)
- updateStage()
- if the puppet of sprite coinSp = 1 then
- set the loc of sprite coinSp to point(-999, -999)
- puppetSprite(coinSp, 0)
- updateStage()
- end if
- DelaySome(30)
- set the loc of sprite buttonSp to point(-999, -999)
- puppetSprite(buttonSp, 0)
- updateStage()
- end
-
- on dropcoin
- puppetSound("Vending machine")
- updateStage()
- case the skillLevel of gExtendData of
- #challenge:
- puppetSprite(coinCoverSp, 1)
- set the loc of sprite coinCoverSp to point(323, 376)
- updateStage()
- #more, #most:
- puppetSprite(coinCoverSp, 1)
- set the loc of sprite coinCoverSp to point(322, 355)
- updateStage()
- end case
- DelaySome(60)
- puppetSprite(coinSp, 1)
- set droppedCoin to getButton(gExtendData) && "coin"
- set the memberNum of sprite coinSp to the number of member droppedCoin
- set the loc of sprite coinSp to point(322, 386)
- updateStage()
- DelaySome(10)
- puppetSound("Coin")
- updateStage()
- set the loc of sprite coinSp to point(322, 402)
- updateStage()
- DelaySome(10)
- set the loc of sprite coinSp to point(322, 425)
- updateStage()
- DelaySome(10)
- set the loc of sprite coinSp to point(322, 438)
- updateStage()
- set the loc of sprite coinCoverSp to point(-999, -999)
- updateStage()
- puppetSprite(coinCoverSp, 0)
- end
-
- on movingcoin point1, rect1, point2, rect2, point3, rect3
- if the memberNum of sprite coinSp <> 0 then
- set tempName to the name of member the member of sprite coinSp
- if word 2 of tempName = "coin" then
- if the loc of sprite coinSp = point(322, 438) then
- set the moveableSprite of sprite coinSp to 1
- end if
- puppetSprite(coinCoverSp, 1)
- set the loc of sprite coinCoverSp to point(-999, -999)
- updateStage()
- repeat while the mouseDown
- set the locH of sprite coinSp to the mouseH
- set the locV of sprite coinSp to the mouseV
- updateStage()
- end repeat
- case 1 of
- inside(point(the mouseH, the mouseV), rect1):
- if getOneBlank(gExtendData, the ansBlank1 of gExtendData) = 0 then
- set the loc of sprite coinSp to point1
- setBlanks(gExtendData, "filled", EMPTY, EMPTY)
- updateStage()
- else
- set the loc of sprite coinSp to point(322, 438)
- end if
- inside(point(the mouseH, the mouseV), rect2):
- if getOneBlank(gExtendData, the ansBlank2 of gExtendData) = 0 then
- set the loc of sprite coinSp to point2
- setBlanks(gExtendData, EMPTY, "filled", EMPTY)
- updateStage()
- else
- set the loc of sprite coinSp to point(322, 438)
- end if
- inside(point(the mouseH, the mouseV), rect3):
- if getOneBlank(gExtendData, the ansBlank3 of gExtendData) = 0 then
- set the loc of sprite coinSp to point3
- setBlanks(gExtendData, EMPTY, EMPTY, "filled")
- updateStage()
- else
- set the loc of sprite coinSp to point(322, 438)
- end if
- otherwise:
- set the loc of sprite coinSp to point(322, 438)
- setBlanks(gExtendData, EMPTY, EMPTY, EMPTY)
- updateStage()
- end case
- set the moveableSprite of sprite coinSp to 0
- case the skillLevel of gExtendData of
- #challenge:
- set the loc of sprite coinCoverSp to point(323, 376)
- otherwise:
- set the loc of sprite coinCoverSp to point(322, 355)
- end case
- updateStage()
- puppetSprite(coinCoverSp, 0)
- end if
- end if
- end
-
- on goAnswer1
- puppetSprite(responseSp, 1)
- puppetSprite(greyScreenSp, 1)
- set RespVar to EMPTY
- if getBlank1(gExtendData) = "filled" then
- set gg to the name of member the member of sprite coinSp
- case the skillLevel of gExtendData of
- #challenge:
- set RespVar to "1"
- set printVar to "7,18"
- if gg = "16 coin" then
- setHandCursor(#off, [coinSp])
- incrementCoinSp()
- setOneBlank(gExtendData, the ansBlank1 of gExtendData, 16)
- end if
- #more:
- set RespVar to "4"
- set printVar to "13,31"
- if gg = "124 coin" then
- setHandCursor(#off, [coinSp])
- incrementCoinSp()
- setOneBlank(gExtendData, the ansBlank1 of gExtendData, 124)
- end if
- #most:
- set RespVar to "7"
- set printVar to "19,44"
- if gg = "133 coin" then
- setHandCursor(#off, [coinSp])
- incrementCoinSp()
- setOneBlank(gExtendData, the ansBlank1 of gExtendData, 133)
- end if
- end case
- else
- if getOneBlank(gExtendData, the ansBlank1 of gExtendData) <> 0 then
- case the skillLevel of gExtendData of
- #challenge:
- set tempNum to "1"
- #more:
- set tempNum to "4"
- #most:
- set tempNum to "7"
- end case
- if tempNum <> EMPTY then
- set ResponseVar to "skill Response" && tempNum
- set the memberNum of sprite responseSp to the number of member ResponseVar
- set the loc of sprite responseSp to point(320, 240)
- set the loc of sprite greyScreenSp to point(0, 0)
- end if
- else
- puppetSprite(responseSp, 0)
- puppetSprite(greyScreenSp, 0)
- end if
- end if
- updateStage()
- if RespVar <> EMPTY then
- set ResponseVar to "skill Response" && RespVar
- set the memberNum of sprite responseSp to the number of member ResponseVar
- set the loc of sprite responseSp to point(320, 240)
- set the loc of sprite greyScreenSp to point(0, 0)
- updateStage()
- put line value(item 1 of printVar) of field "answer key" into line value(item 2 of printVar) of field "extendPrint"
- if iAmActivated(gMasterData) = 0 then
- activate(gMasterData)
- end if
- end if
- end
-
- on goAnswer2
- puppetSprite(responseSp, 1)
- puppetSprite(greyScreenSp, 1)
- set RespVar to EMPTY
- if getBlank2(gExtendData) = "filled" then
- set gg to the name of member the member of sprite coinSp
- case the skillLevel of gExtendData of
- #challenge:
- set RespVar to "2"
- set printVar to "9,21"
- if gg = "18 coin" then
- setHandCursor(#off, [coinSp])
- incrementCoinSp()
- setOneBlank(gExtendData, the ansBlank2 of gExtendData, 18)
- end if
- #more:
- set RespVar to "5"
- set printVar to "15,34"
- if gg = "120 coin" then
- setHandCursor(#off, [coinSp])
- incrementCoinSp()
- setOneBlank(gExtendData, the ansBlank2 of gExtendData, 120)
- end if
- #most:
- set RespVar to "8"
- set printVar to "21,47"
- if gg = "127 coin" then
- setHandCursor(#off, [coinSp])
- incrementCoinSp()
- setOneBlank(gExtendData, the ansBlank2 of gExtendData, 127)
- end if
- end case
- else
- if getOneBlank(gExtendData, the ansBlank2 of gExtendData) <> 0 then
- case the skillLevel of gExtendData of
- #challenge:
- set tempNum to "2"
- #more:
- set tempNum to "5"
- #most:
- set tempNum to "8"
- end case
- if tempNum <> EMPTY then
- set ResponseVar to "skill Response" && tempNum
- set the memberNum of sprite responseSp to the number of member ResponseVar
- set the loc of sprite responseSp to point(320, 240)
- set the loc of sprite greyScreenSp to point(0, 0)
- end if
- else
- puppetSprite(responseSp, 0)
- puppetSprite(greyScreenSp, 0)
- end if
- end if
- updateStage()
- if RespVar <> EMPTY then
- put line value(item 1 of printVar) of field "answer key" into line value(item 2 of printVar) of field "extendPrint"
- set ResponseVar to "skill Response" && RespVar
- set the memberNum of sprite responseSp to the number of member ResponseVar
- set the loc of sprite responseSp to point(320, 240)
- set the loc of sprite greyScreenSp to point(0, 0)
- updateStage()
- if iAmActivated(gMasterData) = 0 then
- activate(gMasterData)
- end if
- end if
- end
-
- on goAnswer3
- puppetSprite(responseSp, 1)
- puppetSprite(greyScreenSp, 1)
- set RespVar to EMPTY
- if getBlank3(gExtendData) = "filled" then
- set gg to the name of member the member of sprite coinSp
- case the skillLevel of gExtendData of
- #challenge:
- set RespVar to "3"
- set printVar to "11,24"
- if gg = "23 coin" then
- setHandCursor(#off, [coinSp])
- incrementCoinSp()
- setOneBlank(gExtendData, the ansBlank3 of gExtendData, 23)
- end if
- #more:
- set RespVar to "6"
- set printVar to "17,37"
- if gg = "144 coin" then
- setHandCursor(#off, [coinSp])
- incrementCoinSp()
- setOneBlank(gExtendData, the ansBlank3 of gExtendData, 144)
- end if
- #most:
- set RespVar to "9"
- set printVar to "23,50"
- if gg = "149 coin" then
- setHandCursor(#off, [coinSp])
- incrementCoinSp()
- setOneBlank(gExtendData, the ansBlank3 of gExtendData, 149)
- end if
- end case
- else
- if getOneBlank(gExtendData, the ansBlank3 of gExtendData) <> 0 then
- case the skillLevel of gExtendData of
- #challenge:
- set tempNum to "3"
- #more:
- set tempNum to "6"
- #most:
- set tempNum to "9"
- end case
- if tempNum <> EMPTY then
- set ResponseVar to "skill Response" && tempNum
- set the memberNum of sprite responseSp to the number of member ResponseVar
- set the loc of sprite responseSp to point(320, 240)
- set the loc of sprite greyScreenSp to point(0, 0)
- end if
- else
- puppetSprite(responseSp, 0)
- puppetSprite(greyScreenSp, 0)
- end if
- end if
- updateStage()
- if RespVar <> EMPTY then
- put line value(item 1 of printVar) of field "answer key" into line value(item 2 of printVar) of field "extendPrint"
- set ResponseVar to "skill Response" && RespVar
- set the memberNum of sprite responseSp to the number of member ResponseVar
- set the loc of sprite responseSp to point(320, 240)
- set the loc of sprite greyScreenSp to point(0, 0)
- updateStage()
- if iAmActivated(gMasterData) = 0 then
- activate(gMasterData)
- end if
- end if
- end
-
- on incrementCoinSp
- if coinSp < 59 then
- set coinSp to coinSp + 1
- end if
- end
-
- on cleanUpCoinSp
- puppetSprite(56, 0)
- puppetSprite(57, 0)
- puppetSprite(58, 0)
- end
-
- on resetCoinSp point1, point2, point3
- set x to getOneBlank(gExtendData, the ansBlank1 of gExtendData)
- if x <> 0 then
- puppetSprite(coinSp, 1)
- set the memberNum of sprite coinSp to the number of member (x && "coin")
- set the loc of sprite coinSp to point1
- setHandCursor(#off, [coinSp])
- set coinSp to coinSp + 1
- end if
- set y to getOneBlank(gExtendData, the ansBlank2 of gExtendData)
- if y <> 0 then
- puppetSprite(coinSp, 1)
- set the memberNum of sprite coinSp to the number of member (y && "coin")
- set the loc of sprite coinSp to point2
- setHandCursor(#off, [coinSp])
- set coinSp to coinSp + 1
- end if
- set z to getOneBlank(gExtendData, the ansBlank3 of gExtendData)
- if z <> 0 then
- puppetSprite(coinSp, 1)
- set the memberNum of sprite coinSp to the number of member (z && "coin")
- set the loc of sprite coinSp to point3
- setHandCursor(#off, [coinSp])
- set coinSp to coinSp + 1
- end if
- end
-
- on clickAnswerExample1
- cursor(200)
- updateStage()
- go("example1")
- put line 1 of field "answer key" into line 5 of field "extendPrint"
- end
-
- on clickAnswerExample2
- cursor(200)
- updateStage()
- go("example2")
- put line 3 of field "answer key" into line 8 of field "extendPrint"
- end
-
- on clickAnswerExample3
- cursor(200)
- updateStage()
- go("example3")
- put line 5 of field "answer key" into line 11 of field "extendPrint"
- end
-
- on clickSkillButton
- exitChooseSkill()
- case the clickOn of
- 19:
- goChallenge()
- 20:
- goMoreChallenge()
- 21:
- goMostChallenge()
- end case
- end
-